<style>
.fui-tab-scroll .item a {color:#999}
.fui-tab-scroll .item.on,.fui-tab-scroll .item.on a{color:#333;font-weight: 400;position: relative;font-size:0.8rem}
.fui-tab-scroll .item.on:before {content: ""; height: 2px; width: 40%; background: #db232b; position: absolute; bottom:0; left: 30%}
.fui-tab-scroll .item.active{color:#db232b;}
.yuyue-duan {border: 1px solid #ddd;border-radius: 4px;padding:0.2rem;height:auto;width:90px;margin:8px;font-size:0.6rem;text-align:center;}
.weui_cells_radio2 .weui_check:checked + .weui_icon_checked:before {
  color: #db232b;
}
.red {color: #db232b;}
.fui-btn-c {
    height: auto;
    background: #f2f2f2;
    margin: 0.6rem 0.3rem;
    padding: 0.6rem;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
	justify-content:center;
    align-items: center;
	color:#db232b;
    position: relative;
	border-radius:1rem;
}

.fui-btn-c .icon {
	font-size:1rem;
	padding-right:0.3rem;
	text-align:right;
}

.fui-btn-c .info {
	text-align:left;
    padding-right: 0.2rem;
    font-size: 0.75rem;
}

.fui-btn-c .info p {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.weui_cells_radio2 .weui_check:checked + .weui_icon_checked:before {
  color: #db232b;
}
.parent-category{float:left; width:100%; height:auto; min-height:100%;}
.parent-category ul{margin:0; padding:0; width:100%;}
.parent-category ul li{list-style:none; text-align:center; height:50px; line-height:50px; white-space:nowrap; width:100%; border-bottom:1px solid #e0e0e0; position:relative; right:-1px;}
.parent-category ul li.active{border-right:1px solid #fff; z-index: 10000}
.parent-category ul li a{color:#333; display:inline-block; width:100%; height:100%; text-decoration:none;}
.parent-category ul li.active a{color:#db232b;}
.children-category{width:100%; min-height:100%; height:auto; color: #252525;}
.children-category ul{list-style:none; margin:0; padding:0; overflow-y:auto; overflow-x:hidden; border-left:1px solid #e0e0e0; min-height:100%;}
.children-category ul li{text-align:left; height: 32px; line-height: 32px; padding-left: 15px}
.children-category ul li.delivery-tips{height:25px; line-height:25px; margin-top: -15px; font-size: .65rem; color: #ff2d4b}
.children-category ul li a{display:inline-block; width:100%; height:100%; text-decoration:none; color:#333;}
.children-category ul li a span{font-size: .6rem; color: #999;}
.children-category .block{display:block; color:#ef1e15; font-size:.6rem;}
</style>
<div class="fui-page  fui-page-current page-goods-list">
<div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
			<a class="back"></a>
		</div>
		<div class="fui-header-input">
			<form method="post">
					<div class="searchbar searchbar-active">
					<div class="search-input">
						<i class="icon jinyunicon icon-search" style="font-size: 1.0rem;"></i>
						<input type="search" id="search" placeholder="输入关键字..." value="">
					</div>
					</div>
			</form>
		</div>
		<div class="fui-header-right" data-nomenu="true">
			<a href="javascript:;"><i class="icon jinyunicon icon-saoyisao2" id="listblock" style="font-size: 1.0rem;"></i></a>
		</div>
</div>
<div class="fui-content" style="top:1.3rem">
		<div class="weui_cells weui_cells_access">
				<a class="weui_cell" href="javascript:;">
					<div class="weui_cell_bd weui_cell_primary" style="padding:0">
						<span>当前定位/选择地区：{{pagedata.pcd.city || '广州市'}}</span>
					</div>
					<div class="weui_cell_ft" ng-click="toogle(post,'show')">
						选择县区
					</div>
				</a>
				<div class="row margin0" ng-show="post.show">
						<div class="jy-3" ng-repeat="value in pagedata.province[pagedata.pcd.province][pagedata.pcd.city]">
							<div class="yuyue-duan" style="width:auto" ng-click="pagedata.showarea=false;pagedata.tool.get_list('jy_weishop/store.index/getlist/province='+pagedata.pcd.province+'&city='+pagedata.pcd.city+'&district='+value)">
									<div>{{value}}</div>
									<div class="clear"></div>
							</div>
						</div>
				</div>
			</div>
			<div ng-if="pagedata.pluginset.nohotarea!=1" class="fui-tab-scroll" style="padding-left:0.8rem">
				<div ng-class="{'item':1,'on':!pagedata.showarea}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.showarea=false">热门地区</a></div>
				<div ng-class="{'item':1,'on':pagedata.showarea}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.showarea=true">其他地区</a></div>
			</div>
			<div ng-if="pagedata.pluginset.nohotarea!=1" class="weui_cells" style="margin:0 0.8rem;border-radius:0.5rem;padding:0.6rem">
				<div class="row margin0">
					<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="pagedata.showarea=false;pagedata.tool.get_list('jy_weishop/store.index/getlist/province=广东省&city=深圳市',true);pagedata.pcd.city='深圳市'">
									<div>深圳市</div>
									<div class="clear"></div>
							</div>
						</div>
						<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="pagedata.showarea=false;pagedata.tool.get_list('jy_weishop/store.index/getlist/province=上海市&city=上海市',true);pagedata.pcd.city='上海市'">
									<div>上海市</div>
									<div class="clear"></div>
							</div>
						</div>
						<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="pagedata.showarea=false;pagedata.tool.get_list('jy_weishop/store.index/getlist/province=广东省&city=东莞市',true);pagedata.pcd.city='东莞市'">
									<div>东莞市</div>
									<div class="clear"></div>
							</div>
						</div>
						<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="pagedata.showarea=false;pagedata.tool.get_list('jy_weishop/store.index/getlist/province=北京市&city=北京市',true);pagedata.pcd.city='北京市'">
									<div>北京市</div>
									<div class="clear"></div>
							</div>
						</div>
						<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="pagedata.showarea=false;pagedata.tool.get_list('jy_weishop/store.index/getlist/province=江苏省&city=南京市',true);pagedata.pcd.city='南京市'">
									<div>南京市</div>
									<div class="clear"></div>
							</div>
						</div>
						<div class="jy-3">
							<div class="yuyue-duan" style="width:auto" ng-click="pagedata.showarea=false;pagedata.tool.get_list('jy_weishop/store.index/getlist/province=浙江省&city=杭州市',true);pagedata.pcd.city='杭州市'">
									<div>杭州市</div>
									<div class="clear"></div>
							</div>
						</div>
				</div>
			</div>
			<div class="fui-tab-scroll" style="padding-left:0.8rem">
				<div ng-class="{'item':1,'on':pagedata.params.type!=1}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.params.type=0;pagedata.tool.get_list('jy_weishop/store.index/getlist/',true)">附近{{pagedata.pluginset.storeunit || '门店'}}</a></div>
				<div ng-class="{'item':1,'on':pagedata.params.type==1}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.params.type=1;pagedata.tool.get_list('jy_weishop/store.index/getlist/type=1',true)">常去{{pagedata.pluginset.storeunit || '门店'}}</a></div>
			</div>
			<div class="fui-list-group merchgroup" style="margin:0 0.8rem;border-radius:0.5rem;">
					<div class="fui-list" ng-repeat="item in pagedata.list">
						<a class="fui-list-inner" style="margin-top:0.16rem" href="javascript:;" ng-click="pagedata.selectstore($index);">
							<div class="title" style="font-size:0.76rem">{{item.title}} <span ng-click="access_json('jy_weishop/store.detail//id='+item.id)" class="red r-f" style="font-size:0.65rem">详情>></span></div>
							<div class="subtitle">
								<i class="icon icon-map" style="color:red;font-size:0.6rem"></i> <span>{{item.address || '该门店还未填写地址'}}</span>
							</div>
							<div class="subtitle" style="font-size:0.55rem">
								<div class="store-moneylimit" ng-if="item.out_juli>=item.juli">
								  <span>¥ <span style="color:#22ad0c">{{pagedata.pluginset.out_price || 10}}.00</span> 起送 </span> | 
								  <span> 配送费¥<span style="color:#22ad0c"> {{item.out_pay|| pagedata.pluginset.out_fee +'.00'}}</span></span>
								  <span class="store-distance">{{item.juli || 0}}km | 约{{item.peisongtime || 50}}分钟</span>
								</div>
								<div class="store-moneylimit" ng-if="item.out_juli<item.juli">
								  <span><span style="color:#22ad0c">超出</span>配送范围({{item.out_juli}}km)</span> | 
								  <span> 配送费¥<span style="color:#22ad0c"> {{item.out_pay|| pagedata.pluginset.out_fee +'.00'}}</span></span>
								  <span class="store-distance">{{item.juli || 0}}km | 超出</span>
								</div>
							</div>
						</a>
				</div>
			</div>
</div>
</div>
<div ng-if="pagedata.showarea" class="popup">
	<div class="popup-body">
		<div class="popup-bottom" style="height:20rem;overflow-y:scroll">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showarea=false"></i>
			<div ng-repeat="(value,data) in pagedata.province">
				<div class="weui_cells_title">{{value}}</div>
				<div class="weui_cells">
					<div class="row margin0">
						<div class="jy-3" ng-repeat="(value,data) in pagedata.province[value]">
								<div class="yuyue-duan" style="width:auto" ng-click="pagedata.showarea=false;pagedata.tool.get_list('jy_weishop/store.index/getlist/province='+pagedata.pcd.province+'&city='+value,true);pagedata.pcd.city=value">
										<div>{{value}}</div>
										<div class="clear"></div>
								</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.showorder_type" class="popup">
	<div class="popup-body">
		<div class="popup-bottom" style="height:auto;overflow-y:scroll">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showorder_type=false"></i>
			<div class="fui-page-title" style="margin-top:1rem;padding:0 0.6rem;text-align:left">
			  <div style="font-size:0.8rem">{{pagedata.post.title}}</div>
			  <div><span class="subtitle"><i class="icon icon-map" style="font-size:0.6rem;color:red"></i> {{pagedata.post.address || pagedata.pluginset.storeunit+'详细地址'}}</span></div>
			</div>
			<div class="weui_cells weui_cells_radio2">
				<label ng-if="pagedata.pluginset.down_send_type2 !=1" class="weui_cell weui_check_label" for="x21">
					<div class="weui_cell_hd">
						<input type="radio" class="weui_check" value="2" ng-model="pagedata.post.sendtype" ng-checked="pagedata.post.sendtype==2" id="x21">
						<span class="weui_icon_checked"></span>
					</div>
					<div ng-class="{'weui_cell_bd weui_cell_primary':1,'red':pagedata.post.sendtype==2}">
						<div>现在点餐 支付成功后取餐</div>
						<div>Now</div>
					</div>
				</label>
				<label ng-if="pagedata.pluginset.down_send_type1 !=1" class="weui_cell weui_check_label" for="x22">
					<div class="weui_cell_hd" ng-if="pagedata.nowstore.out_juli>=pagedata.nowstore.juli">
						<input type="radio" class="weui_check" value="1" ng-model="pagedata.post.sendtype" ng-checked="pagedata.post.sendtype==1" id="x22">
						<span class="weui_icon_checked"></span>
					</div>
					<div class="weui_cell_hd" ng-if="pagedata.nowstore.out_juli<pagedata.nowstore.juli">
						<input type="radio" class="weui_check" value="1" readonly>
						<span class="weui_icon_checked readonly"></span>
					</div>
					<div ng-if="pagedata.nowstore.out_juli>=pagedata.nowstore.juli" ng-class="{'weui_cell_bd weui_cell_primary':1,'red':pagedata.post.sendtype==1}">
						<div>外卖配送 支付成功后配送</div>
						<div>Now out</div>
					</div>
					<div ng-if="pagedata.nowstore.out_juli<pagedata.nowstore.juli" ng-class="{'weui_cell_bd weui_cell_primary':1,'red':pagedata.post.sendtype==1}">
						<div style="color:red">超出配送范围(您可以选择其他附近的{{pagedata.pluginset.storeunit || '门店'}})</div>
						<div>Out In</div>
					</div>
				</label>
				<label ng-if="pagedata.pluginset.down_send_type3 !=1" class="weui_cell weui_check_label" for="x23">
					<div class="weui_cell_hd">
						<input type="radio" class="weui_check" value="3" ng-model="pagedata.post.sendtype" id="x23" ng-checked="pagedata.post.sendtype==3">
						<span class="weui_icon_checked"></span>
					</div>
					<div ng-class="{'weui_cell_bd weui_cell_primary':1,'red':pagedata.post.sendtype==3}">
						<div>预约点餐 预约当天 签到后取餐</div>
						<div>Later</div>
					</div>
					<div class="weui_cell_ft">
					</div>
				</label>
			</div>
			<div ng-if="pagedata.post.sendtype!=1 && (pagedata.pluginset.down_send_type3 !=1 || pagedata.pluginset.down_send_type2 !=1)" class="col-jy" style="padding:0.5rem">
				<div class="subtitle">请选择就餐方式</div>
				<div class="col-jy-2">
					<a href="javascript:;" ng-click="access_json('jy_weidish/goodslist//self_type=1&id='+pagedata.post.id+'&sendtype='+pagedata.post.sendtype)" class="fui-btn-c">
						<i class="icon icon-peisong"></i>
						<div class="info"><div class="bold" style="line-height:1">店内就餐</div><div style="line-height:1">Dine IN</div></div>
					</a>
				</div>
				<div class="col-jy-2">
					<a href="javascript:;" ng-click="access_json('jy_weidish/goodslist//self_type=0&id='+pagedata.post.id+'&sendtype='+pagedata.post.sendtype)" class="fui-btn-c">
						<i class="icon icon-gifts"></i>
						<div class="info"><div class="bold" style="line-height:1">打包带走</div><div style="line-height:1">Take Away</div></div>
					</a>
				</div>
			</div>
			<div ng-if="pagedata.post.sendtype==1 && pagedata.pluginset.down_send_type1 !=1" class="col-jy" style="padding:0.5rem">
				<div class="subtitle">请选择配送时间</div>
				<div class="col-jy-2">
					<a href="javascript:;" ng-click="access_json('jy_weidish/goodslist//make_type=0&id='+pagedata.post.id+'&sendtype='+pagedata.post.sendtype)" class="fui-btn-c">
						<i class="icon icon-peisong"></i>
						<div class="info"><div class="bold" style="line-height:1">立即配送</div><div style="line-height:1">Dine IN</div></div>
					</a>
				</div>
				<div class="col-jy-2">
					<a href="javascript:;" ng-click="pagedata.selecttime()"  class="fui-btn-c">
						<i class="icon icon-daishouhuo1"></i>
						<div class="info"><div class="bold" style="line-height:1">预约配送</div><div style="line-height:1">Take Away</div></div>
					</a>
				</div>
			</div>
			<div ng-if="pagedata.post.sendtype==2 && pagedata.pluginset.down_send_type3 ==1 && pagedata.pluginset.down_send_type2 ==1" class="col-jy" style="padding:0.5rem">
				<div class="col-jy-2">
					<a class="fui-btn-c" style="background:#f1f1f1;box-shadow: 0 8px 6px #f1f1f1;">
						<i class="icon icon-peisong" style="color:#999"></i>
						<div class="info"><div class="bold" style="line-height:1;color:#999">{{pagedata.pluginset.on_feejia==1?'加急配送':'立即配送'}}</div><div style="line-height:1;color:#999">Dine IN</div></div>
					</a>
				</div>
				<div class="col-jy-2">
					<a href="javascript:;" ng-click="access_json('jy_weidish/goodslist//make_type=0&id='+pagedata.post.id+'&sendtype='+pagedata.post.sendtype)"  class="fui-btn-c">
						<i class="icon icon-tuwenwenzhen"></i>
						<div class="info"><div class="bold" style="line-height:1;">随便逛逛</div><div style="line-height:1;color:#999">Look Away</div></div>
					</a>
				</div>
			</div>
		</div>
	</div>
</div>
<div id="selecttime" class="modal fade" tabindex="-1" style="z-index: 99999; display: none;">
	<div class="modal-dialog" style="width:100%;bottom:0%;left:0%;">
	<div class="modal-content" style="border-radius: 4px;">
		<div aria-hidden="true" data-dismiss="modal" class="closebtn" style="color:#ddd;top:0.2rem;right:0.2rem"><i class="icon icon-wrong" style="font-size:1.3rem;"></i></div>
		<div class="fui-line" style="width:6rem;margin:0.5rem auto 0 auto">
			<div class="text red" style="background-color:#fff" >请选择送达时间</div>
		</div>
		<div class="row margin0">
			<div class="col-xs-3">
				<div class="parent-category" id="delivery-time-parent">
					<ul>
							<li ng-class="{'active':pagedata.post.dayid==$index}" ng-repeat="(key,value) in pagedata.out_time.days"><a href="javascript:;" ng-click="pagedata.post.dayid=$index">{{value}}</a></li>
					</ul>
				</div>
			</div>
			<div class="col-xs-9" style="padding-left:0;padding-bottom:1rem">
				<div class="children-category" id="delivery-time-children">
					<div class="children-category-wrapper">
						<ul id="category1" aria-hidden="true" data-dismiss="modal" style="height:19rem">
								<li ng-show="pagedata.out_time.lasttimebox != 0 || pagedata.post.dayid!=0" class="time-flag"><a href="javascript:;" ng-click="access_json('jy_weidish/goodslist//make_type=1&id='+pagedata.post.id+'&sendtype='+pagedata.post.sendtype+'&out_time='+pagedata.predict_time+'&dayid='+pagedata.post.dayid)">尽快送达 <span>(配送费￥{{pagedata.out_time.times[0].out_pay}})</span></a></li>
								<li ng-show="pagedata.out_time.lasttimebox != 0 || pagedata.post.dayid!=0" class="delivery-tips time-flag" style="color:#09ba07">约{{pagedata.predict_time}}送达</li>
								<li ng-repeat="item in pagedata.out_time.times" ng-click="access_json('jy_weidish/goodslist//make_type=1&id='+pagedata.post.id+'&sendtype='+pagedata.post.sendtype+'&out_time='+item.timev+'&dayid='+pagedata.post.dayid)" ng-class="{'hide init-hide':(item.timestamp <= pagedata.timestamp && pagedata.post.dayid==0)}">
									<a href="javascript:;">{{item.timev}} <span>({{item.out_pay}})</span></a>
								</li>
								<div class="content-empty" ng-show="pagedata.out_time.lasttimebox == 0 && pagedata.post.dayid==0">
									  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">当天没有配送时间段！</p>
								</div>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	</div>
</div>
<script type="text/javascript">
scope.pagedata.params={}
scope.pagedata.post={'sendtype':2,'dayid':0}
// 百度地图API功能
if(!scope.pagedata.lat_lng && !scope.main.lat_lng){
	window.scope.location(function(res){
		scope.main.lat_lng=res.lat_lng;
		scope.main.pcd=res.addressComponents;
		scope.pagedata.pcd=scope.main.pcd;
		scope.tool.get_list('jy_weishop/store.index/getlist/limit=5&lat='+scope.main.lat_lng.lat+'&lng='+scope.main.lat_lng.lng,true);
	});
}else{
	scope.pagedata.pcd=scope.main.pcd;
	scope.tool.get_list('jy_weishop/store.index/getlist/limit=5&lat='+scope.main.lat_lng.lat+'&lng='+scope.main.lat_lng.lng,true);
}
scope.pagedata.selectstore=function(index){
	scope.pagedata.showorder_type=true;
	scope.pagedata.nowstore=scope.pagedata.list[index];
	if(scope.pagedata.nowstore.out_juli<scope.pagedata.nowstore.juli){
		scope.pagedata.post.sendtype=2;
	}else{
		scope.pagedata.post.sendtype=1;
	}
	scope.pagedata.post.id=scope.pagedata.nowstore.id;
	scope.pagedata.post.title=scope.pagedata.nowstore.title;
	scope.pagedata.post.address=scope.pagedata.nowstore.address
}
scope.pagedata.selecttime=function(){
	$('#selecttime').modal();
	var store_id=scope.pagedata.post.id
	scope.get('jy_weidish/index/out_time/store_id='+store_id,function(res){
		scope.pagedata.out_time=res.out_time;
		scope.pagedata.predict_time=res.predict_time;
		scope.pagedata.timestamp=res.timestamp;
		scope.$evalAsync();
	});
}
</script>
<div ng-include="sys_html('common/pluginnav',true)"></div>